package com.lgedu.houswork10;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;

public class h101 {

    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int len = Integer.parseInt(br.readLine());
        String[] ss = br.readLine().trim().split(" ");
        boolean res = hasSame(ss);
        System.out.println(res?"YES":"NO");
    }
    public static boolean hasSame(String[] arr){
        boolean result =false;
        if(arr==null)
            result = true;
        else{
            HashSet<String> set = new HashSet<>();
            for(int i=0;i<arr.length;i++){
                if(set.add(arr[i])){
                    result =false;
                }else{
                    result =true;
                    break;
                }
            }
        }

        return result;
    }
}
